#include <xmmintrin.h>
#include <emmintrin.h>
#include <pmmintrin.h>
#include <tmmintrin.h>
#include <smmintrin.h>
#include <nmmintrin.h>
#include <immintrin.h>
#include <windows.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>

using namespace std;

int main()
{
    long long freq,head,tail;
    srand(time(0));
    QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
    int row = 0;
    for(int i = 1; i < 20;++i)
    {
        row += 100;
        QueryPerformanceCounter((LARGE_INTEGER *)&head);
        for(int q = 0;q<5;q++)
        {
            float ** mat;
            mat = new float*[row];
            for (int i = 0; i < row; i++)
            {
                mat[i] = new float[row];
                for (int j = 0; j < row; j++)
                    mat[i][j] = rand();
            }
            for (int k = 0; k < row; k++)
            {
                for (int j = k + 1; j < row; j++)
                    mat[k][j] = mat[k][j] / mat[k][k];
                mat[k][k] = 1.0;
                for (int i = k + 1; i < row; i++)
                {
                    for (int j = k + 1; j < row; j++)
                        mat[i][j] -= mat[i][k] * mat[k][j];
                    mat[i][k] = 0;
                }
            }
            for (int i = 0; i < row; i++)
            {
                delete[] mat[i];
            }
            delete[] mat;
        }
        QueryPerformanceCounter((LARGE_INTEGER *)&tail );
        cout <<(tail-head)*200.0/freq <<endl;
    }
}

